xen: No need for shadow_drop_references() in remove_page().
authorKeir Fraser <keir@xensource.com>
Wed, 4 Apr 2007 21:47:20 +0000 (22:47 +0100)
committerKeir Fraser <keir@xensource.com>
Wed, 4 Apr 2007 21:47:20 +0000 (22:47 +0100)
Because:
    guest_physmap_remove_page()
 -> p2m_remove_page()
 -> set_p2m_entry()
 -> paging_write_p2m_entry()
 -> shadow_write_p2m_entry()

And shadow_write_p2m_entry() calls sh_remove_all_*() fns.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/common/memory.c

index 139a0e89b3d503a24b17b47fbf0b53825c65c86d..8fe4523582c21c429d58c7bf0595165c5ba177e8 100644 (file)
@@ -173,12 +173,6 @@ int guest_remove_page(struct domain *d, unsigned long gmfn)
     if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
         put_page(page);
 
-    if ( unlikely((page->count_info & PGC_count_mask) != 1) )
-    {
-        shadow_drop_references(d, page);
-        /* NB: still may have foreign references to the page at this stage */
-    }
-
     guest_physmap_remove_page(d, gmfn, mfn);
 
     put_page(page);